
import wx
import wx.aui
from wx import xrc
from xrc.mainfrm_xrc import *

class CContiToolFrame(xrcMainFrame):
    def __init__(self, parent):
        super(CContiToolFrame, self).__init__(parent)
        self.setup()

    def setup(self):

        self.BindEvents()

    def BindEvents(self):
        self.Bind(wx.EVT_MENU, self.OnExit, id=xrc.XRCID("menu_item_exit"))
        self.Bind(wx.EVT_MENU, self.OnOpen, id=xrc.XRCID("menu_item_open"))
        self.Bind(wx.EVT_MENU, self.OnSave, id=xrc.XRCID("menu_item_save"))
        self.Bind(wx.EVT_MENU, self.OnSaveAs, id=xrc.XRCID("menu_item_save_as"))


    def OnExit(self, event):
        self.Close()

    def OnOpen(self, event):
        self.nb_conti_tool.GetCurrentPage().OnOpen(event)

    def OnExit(self, event):
        self.nb_conti_tool.GetCurrentPage().OnClose(event)
        self.Close()

    def OnSave(self, event):
        self.nb_conti_tool.GetCurrentPage().OnSave(event)

    def OnSaveAs(self, event):
        self.nb_conti_tool.GetCurrentPage().OnSaveAs(event)

# end of class CToolFrame
